From 275760cd0c95e8e748f64a13240986a61728d3d7 Mon Sep 17 00:00:00 2001 From: Cody Russell Date: Tue, 5 Feb 2008 23:46:35 +0000 Subject: [PATCH] Walk down the stack until we get to a window that is mapped. Otherwise 2008-02-05 Cody Russell * gdk/win32/gdkwindow-win32.c (_gdk_modal_current): Walk down the stack until we get to a window that is mapped. Otherwise hiding a window will cause all windows in the app to be blocked. (#514643) svn path=/trunk/; revision=19477 --- ChangeLog | 7 +++++++ gdk/win32/gdkwindow-win32.c | 16 +++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index b2154eadf6..1cee4be6fc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-02-05 Cody Russell + + * gdk/win32/gdkwindow-win32.c (_gdk_modal_current): Walk + down the stack until we get to a window that is mapped. + Otherwise hiding a window will cause all windows in the app + to be blocked. (#514643) + 2008-02-05 Matthias Clasen * gtk/updateiconcache.c: Ignore images in the toplevel theme diff --git a/gdk/win32/gdkwindow-win32.c b/gdk/win32/gdkwindow-win32.c index b81357643e..0bcaeba22c 100644 --- a/gdk/win32/gdkwindow-win32.c +++ b/gdk/win32/gdkwindow-win32.c @@ -2064,7 +2064,21 @@ _gdk_remove_modal_window (GdkWindow *window) GdkWindow * _gdk_modal_current () { - return modal_window_stack != NULL ? modal_window_stack->data : NULL; + if (modal_window_stack != NULL) + { + GSList *tmp = modal_window_stack; + + while (tmp != NULL && !GDK_WINDOW_IS_MAPPED (tmp->data)) + { + tmp = g_slist_next (tmp); + } + + return tmp != NULL ? tmp->data : NULL; + } + else + { + return NULL; + } } void -- 2.30.2